﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TemplatesPrint.DBHelper;
using TemplatesPrint.Entitys;

namespace TemplatesPrint.EntityHandle
{
   public  class TaskLogHandle
    {
        public static void SaveLog(string msgid, string describe, string msg,string status="true", string type = "")
        {
            using (var db = SQLiteHelper.GetInstance())
            {
                var log = new TaskLogEntity();
                log.TaskId = msgid;
                log.Describe = describe;
                log.Msg = msg;
                log.Status = status;
                log.CreateTime=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
                log.IsUpLoad = "0";
                log.Type = type;
                db.Insertable(log).ExecuteCommand();
            };
        }
    }
}
